//:C06:ep_6_4.c -- while and do while.
#include <stdio.h>

int main(void)
{
    int sum = 0, i;
    printf("Enter a integer: \n");
    scanf("%d", &i);
    while(i <= 10)
    {
        sum += i;
        i++;
    }

    printf("%d\n", sum);
}